/* 文本 */

[data-shape="text"] {
  &:focus,
  &:active {
    outline: none;
  }
  &::after {
    display: none;
  }
  outline: none !important;
  caret-color: var(--primary);
  border: none !important;
  overflow: visible;
  textarea {
    resize: none;
    width: 100%;
    height: 60px;
    height: 100%;
    position: absolute;
    z-index: 100;
    font-size: 12px;
    padding: 0;
    margin: 0;
    outline: none;
    border: none;
    background-color: transparent;
    line-height: initial;
    &:focus,
    &:active {
      border: none;
      outline: none;
    }
  }
}
[data-shape="canvas"] {
  cursor: crosshair;
}

[data-shape="d-image"] {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

[data-shape="d-barcode"] {
  background-image: linear-gradient(90deg, gray 1px, transparent 0);
  background-size: 2px 100%;
}
// [data-shape="rect"] {
//   width: calc(100% - 2px) !important;
//   height: calc(100% - 2px) !important;
//   position: relative;
//   left: 1px;
//   top: 1px;
// }

[data-shape="image"] {
  .no-image {
    background-color: #f8f8f8;
    height: 100%;
    color: #999;
  }
  &::after {
    display: none;
  }
}
[data-shape="rect"] {
  border: none;
  outline: none;
}
[data-shape="qrcode"] {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.bgimage {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
/* 没有选中的组件，默认灰色 */
.drag-item {
  // box-sizing: content-box !important;
  border: none !important;
  outline: none !important;
  *::-webkit-scrollbar {
    display: none;
  }
  &:hover {
    outline: 1px solid var(--primary) !important;
  }
  /* 包含边距总共一起的宽度 */
  [data-shape] {
    border: none;
    position: absolute;
    width: 100%;
    height: 100%;
    outline: none;
  }
  /* 轮廓线 */
  .auxiliary-line {
    border: 1px dashed #3333334d;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none !important;
    background-color: transparent;
  }
}
.no-border {
  border: none !important;
  outline: none;
  // outline: 1px dashed #aaa;
}
.no-video {
  background-color: #eee;
  color: #999;
}
